package com.lin;

import java.util.Arrays;
import java.util.Collections;

public class Solution164 {
    public int maximumGap(int[] nums) {
        Arrays.sort(nums);
        int ans = 0;
        for (int i=1;i<nums.length;i++) {
            ans = nums[i]-nums[i-1]>ans?nums[i]-nums[i-1]:ans;
        }
        return ans;
    }
}

